package org.pupil.socket.serialization;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 序列化工厂
 * @Author: pupil
 * @Date: 2024/07/07 下午 1:21
 */
public class SerializationFactory {

    private static Map<org.pupil.common.constants.RpcSerialization, RpcSerialization> serializationMap
            = new HashMap<>();

    static {
        serializationMap.put(org.pupil.common.constants.RpcSerialization.JSON, new JsonSerialization());
    }

    public static RpcSerialization get(org.pupil.common.constants.RpcSerialization rpcSerialization) {
        return serializationMap.get(rpcSerialization);
    }
}
